﻿<phone:PhoneApplicationPage x:Class="HelloWindowsPhoneMVC.Views.Home.DebugPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:Commands="clr-namespace:WindowsPhoneMVC.Commands;assembly=WindowsPhoneMVC"
                            xmlns:Phone="clr-namespace:WindowsPhoneMVC.Phone;assembly=WindowsPhoneMVC"
                            xmlns:Controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            xmlns:Home="clr-namespace:HelloWindowsPhoneMVC.ViewModels.Home"
                            xmlns:Controls2="clr-namespace:WindowsPhoneMVC.Controls;assembly=WindowsPhoneMVC"
                            xmlns:Controls3="clr-namespace:WindowsPhoneEssentials.Controls;assembly=WindowsPhoneEssentials.Controls"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait"
                            Orientation="Portrait"
                            shell:SystemTray.IsVisible="True"
                            mc:Ignorable="d"
                            d:DesignHeight="768"
                            d:DesignWidth="480"
                            d:DataContext="{d:DesignInstance Home:DebugPageViewModel}">
    <Controls:TransitionService.NavigationInTransition>
        <Controls:NavigationInTransition>
            <Controls:NavigationInTransition.Backward>
                <Controls:TurnstileTransition Mode="BackwardIn" />
            </Controls:NavigationInTransition.Backward>
            <Controls:NavigationInTransition.Forward>
                <Controls:TurnstileTransition Mode="ForwardIn" />
            </Controls:NavigationInTransition.Forward>
        </Controls:NavigationInTransition>
    </Controls:TransitionService.NavigationInTransition>
    <Controls:TransitionService.NavigationOutTransition>
        <Controls:NavigationOutTransition>
            <Controls:NavigationOutTransition.Backward>
                <Controls:TurnstileTransition Mode="BackwardOut" />
            </Controls:NavigationOutTransition.Backward>
            <Controls:NavigationOutTransition.Forward>
                <Controls:TurnstileTransition Mode="ForwardOut" />
            </Controls:NavigationOutTransition.Forward>
        </Controls:NavigationOutTransition>
    </Controls:TransitionService.NavigationOutTransition>
    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot">
        <toolkit:Pivot Title="my application"
                       Phone:Restore.PivotPosition="True">

            <!--Panorama item one-->
            <toolkit:PivotItem Header="item1">
                <StackPanel>
                    <ListBox ItemsSource="{Binding Items}"
                             Commands:Navigate.OnItemSelected="AnotherController.ItemAction"
                             DisplayMemberPath="Title" />
                    <TextBlock Text="Date picker causes navigation away from MVC, use to test" />
                    <Controls:DatePicker />

                    <Button Content="MVC Chooser"
                            Commands:Click.Command="{Binding GetValueCommand}" />
                    <Button Content="Navigate with private argument"
                            Commands:Click.Command="{Binding NavigateWithPrivateCommand}" />
                    <Button Content="Invoke Background Action"
                            Commands:Click.Command="{Binding InvokeBackgroundCommand}" />
                </StackPanel>
            </toolkit:PivotItem>

            <toolkit:PivotItem Header="item2">
                <StackPanel>
                    <TextBlock Text="Testing restore of panorama item, item 2 should be selected when you come back" />

                    <Button Commands:Navigate.To="AnotherController.Example"
                            Content="Navigate" />

                    <Button Commands:Navigate.To="AnotherController.BenchmarkIoC"
                            Content="Benchmark IoC resolution" />

                    <Button Commands:Navigate.To="AnotherController.BackTest"
                            Content="GoBackActionResult" />

                    <Button Commands:Click.Command="{Binding RefreshCommand}"
                            Content="Refresh data from Controller" />

                    <Button Commands:Click.Command="{Binding ActionWithComplexParam}"
                            Content="Navigate w/ Arg" />
                </StackPanel>
            </toolkit:PivotItem>

            <toolkit:PivotItem Header="item3">
                <StackPanel>
                    <TextBlock Text="This page is for testing the tombstoning, second textbox supports tombstoning" />
                    <TextBox Text="{Binding Parameter.Message, Mode=TwoWay}" />
                    <TextBox Text="{Binding ParameterWritable.Message, Mode=TwoWay}" />
                </StackPanel>
            </toolkit:PivotItem>

            <Controls3:LoadingPivotItem Header="Lazy Pivot">
                <Controls2:PartialView Source="Debug.DemoPartial" />
            </Controls3:LoadingPivotItem>
        </toolkit:Pivot>
    </Grid>
</phone:PhoneApplicationPage>